/* Fixed download */
#download-wrapper {
    --wrapper-spacing: 32px;
    display: flex;
    flex-direction: column;
    padding: 16px;
    justify-content: center;
    align-items: center;
    gap: 16px;
    position: fixed;
    bottom: var(--wrapper-spacing);
    left: var(--wrapper-spacing);
    border-radius: 16px;
    border: 4px solid #FF6F57;
    background: #FFF;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.10);
    margin-bottom: calc(-150px - var(--wrapper-spacing));
    transition: margin-bottom 0.4s ease-in-out;
    z-index: 10;
    text-align: center;
}

#download-wrapper.mobile {
    flex-direction: row;
}

#download-wrapper.active {
    margin-bottom: 0;
}

#download-wrapper.margin-bottom {
    margin-bottom: 80px;
}

#download-wrapper .download-button {
    width: min-content;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: #000;
    font-family: DM Sans;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0.32px;
    text-decoration: none;
}

#download-wrapper .download-button img {
    display: none;
}

#download-wrapper.mobile #qrcode {
    display: none;
}

#download-wrapper.mobile .download-button img {
    display: inline-block;
}

#download-wrapper.mobile #qrcode:empty ~ #download-wrapper {
    display: none;
}

@media (max-width: 768px) {
    #download-wrapper {
        --wrapper-spacing: 20px;
        padding: 12px;
    }
}

/* New QR design */
#floating-qr {
    position: fixed;
    bottom: 0;
    display: flex;
    flex-direction: column;
    border-radius: 16px 16px 0 0;
    background: #FFE236;
    left: calc((100% - 1392px) / 2);
    margin-bottom: -230px;
    transition: margin-bottom 0.4s ease-in-out;
    width: max-content;

    z-index: 10;
}

#floating-qr.active {
    margin-bottom: 0;
}

#floating-qr.collapsed.active:not(.mobile) {
    margin-bottom: -184px;
}

#floating-qr .qr-title {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 8px;
    gap: 16px;
    font-weight: 700;

    transition: padding 0.4s ease-in-out;
}

#floating-qr.collapsed .qr-title {
    padding-bottom: 16px;
}

#floating-qr .qr-title button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    height: 24px;
}

#floating-qr:not(.collapsed) .qr-title button img {
    transform: rotate(180deg);
}

#floating-qr .qr-title button img {
    transition: transform 0.3s ease-in-out;
}

#floating-qr .qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0 16px;
    margin: 4px 4px 0;
    background: #8252FF;
    border-radius: 16px 16px 0 0;
    gap: 8px;
}

#floating-qr .qr-wrapper span {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

#floating-qr #qrcode {
    padding: 5px;
    background: #fff;
    border-radius: 4px;
}

#floating-qr.mobile {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

#floating-qr.mobile.active {
    margin-bottom: 0;
}

#floating-qr .download-button {
    display: none;
    padding: 12px 16px;
    border-radius: 0 0 16px 16px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
}

#floating-qr.mobile .qr-wrapper,
#floating-qr.mobile .qr-title {
    display: none;
}

#floating-qr.mobile .download-button {
    display: flex;
}

.hidden {
    display: none !important;
}

#qrcode canvas {
    display: block;
}

#qrcode canvas:not(:first-child) {
    display: none;
}

@media (max-width: 1440px) {
    #floating-qr {
        left: 24px;
    }
}
